<?php

class Event_Widget_Browse_Profile_Index extends Nuo_Widget
{
	function execute()
	{
		$table = Nuo::getTable('event');

		$mainResource=Nuo::getVar('mainResource');

		$select = $table -> select() 
		-> from(array('m' => $table -> getName()))
		  //-> where('poster_type=?', $subject -> getType()) 
		  //-> where('poster_id=?', $subject -> getId()) 
		  -> order('created_at DESC');

		$paging = Nuo_Paging::factory($select);

		return $this -> render(array(
			'paging' => $paging,
			'resource' => $mainResource
		));
	}

}
